﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using FIFP.DashBoard.RelationalDataService;
using System.ServiceModel;

namespace FIFP.DashBoard.Helper
{
    public class FIFPServiceHostUtil
    {
        public static BasicHttpBinding GetQueryBasicHttpBinding()
        {

            int maxLimit = Int32.MaxValue;// 2147483647;
            BasicHttpBinding httpBinding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
            httpBinding.SendTimeout = new TimeSpan(0, 5, 0);
            httpBinding.ReceiveTimeout = new TimeSpan(0, 5, 0);

            httpBinding.MaxReceivedMessageSize = maxLimit;
            httpBinding.MaxBufferSize = maxLimit;
            return httpBinding;

        }

        public static EndpointAddress GetQueryEndpointAddress()
        {
            EndpointAddress address = new EndpointAddress(App.AoServicesUri + FIFPConstants.RelationaDataUrl);
            return address;
        }
    }
}
